package com.xr.core.system.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RabbitMQConsumer {

    @RabbitListener(queues = {"testQueue"})
    public void receiveMessage(@Payload String message) {
        log.info("当前时间戳<{}>，testQueue队列接收消息<{}>", System.currentTimeMillis(), message);
    }

}
